package com.diandian.backend.product.clients.dto.third;

import com.diandian.base.boot.starter.exception.DefaultException;

import java.io.Serializable;

public class ThirdSkuStockQueryParamDTO implements Serializable {

    private String source; // 库存来源，对应中台业务的belong字段
    private String productCode;
    private String skuCode;
    private String storeCode;

    public void check(){
        if(this.source == null || "".equals(this.source)){
            throw new DefaultException("来源不能为空");
        }
        if(this.productCode == null || "".equals(this.productCode)){
            throw new DefaultException("商品编码不能为空");
        }
        if(this.storeCode == null || "".equals(this.storeCode)){
            throw new DefaultException("门店编码不能为空");
        }
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getSkuCode() {
        return skuCode;
    }

    public void setSkuCode(String skuCode) {
        this.skuCode = skuCode;
    }

    public String getStoreCode() {
        return storeCode;
    }

    public void setStoreCode(String storeCode) {
        this.storeCode = storeCode;
    }
}
